package com.yunsoft.pojo;

import org.springframework.beans.factory.annotation.Autowired;

public class Student {
	private String name;
	private int age;
	private int id;
	
	
	public Integer getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		System.out.println(this.name);
		return name;
	}
	@Autowired
	public void setName(String name) {
	
		this.name = name;
	}
	public int getAge() {
		System.out.println(this.age);
		return age;
	}
	@Autowired(required=false)
	public void setAge(int age) {
		this.age = age;
	}
	public String print(){
		System.out.println("student: name:"+this.name+"age:"+this.age);
		return this.name+":"+this.age;
	}
	
	public void printExechetion(){
		System.out.println("Exception e");
		throw new IllegalArgumentException();
	}
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "id:"+id+"name:"+name+"age:"+age;
	}
	
}
